package com.example.shop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.shop.bean.CartBean;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CartMapper extends BaseMapper<CartBean> {

    @Select("select * from view_cart where uid=#{uid}")
    List<CartBean> cartSelByUid(@Param("uid") int uid);

    @Select("select * from tbl_cart where uid=#{uid} and pid=#{pid}")
    List<CartBean> cartSelByPidUid(@Param("pid") int pid,@Param("uid") int uid);
}
